package com.cybertooth.dbconvenience.query.columns;

import org.junit.Test;

import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;

/**
 * <p></p>
 *
 * @author dnelson
 */
public class WhenSimpleColumnIsCreated {

	@Test
	public void theColumnWithoutPrefixToSqlIsCorrect() {
		Column c = new Column("col1");
		assertThat(c.toSql().trim(), is("col1"));
	}

	@Test
	public void theColumnWithPrefixToSqlIsCorrect() {
		Column c = new Column("t1", "col1");
		assertThat(c.toSql().trim(), is("t1.col1"));
	}
}
